/*   1:    */ package com.rinsi.app.jczl.kjxx.sbxx;
/*   2:    */ 
/*   3:    */ import com.rinsi.core.service.CoreSimpleService;
/*   4:    */ import java.util.List;
/*   5:    */ import java.util.Map;
/*   6:    */ import org.mybatis.spring.SqlSessionTemplate;
/*   7:    */ import org.springframework.stereotype.Service;
/*   8:    */ 
/*   9:    */ @Service
/*  10:    */ public class SbxxService
/*  11:    */   extends CoreSimpleService
/*  12:    */ {
/*  13:    */   public void afterIndex(Map<String, Object> model, Map<String, Object> rMap)
/*  14:    */   {
/*  15: 15 */     Map<String, Object> params = getParams(model);
/*  16:    */     
/*  17: 17 */     Map<String, Object> config = getConfig(model);
/*  18:    */     
/*  19: 19 */     Integer num = (Integer)getSqlSessionTemplate().selectOne(namespace(config) + ".countSb", params);
/*  20: 21 */     if (num.intValue() == 0) {
/*  21: 23 */       getSqlSessionTemplate().selectOne(namespace(config) + ".insert", params);
/*  22:    */     }
/*  23: 25 */     rMap.put("sbxxs", getSqlSessionTemplate().selectList(namespace(config) + ".list", params));
/*  24:    */     
/*  25: 27 */     rMap.put("tffss", getSqlSessionTemplate().selectList("Core.getCodeList", Integer.valueOf(400017)));
/*  26:    */     
/*  27: 29 */     rMap.put("fjxss", getSqlSessionTemplate().selectList("Core.getCodeList", Integer.valueOf(300002)));
/*  28:    */     
/*  29: 31 */     Map<String, Object> returnData = (Map)getSqlSessionTemplate().selectOne(namespace(config) + ".list", params);
/*  30:    */     
/*  31: 33 */     List<Map<String, Object>> fjxss = getSqlSessionTemplate().selectList("Core.getCodeList", Integer.valueOf(300002));
/*  32:    */     
/*  33: 35 */     String[] jfjxs = null;
/*  34:    */     
/*  35: 37 */     StringBuffer sb = new StringBuffer();
/*  36: 39 */     if ((returnData.get("SBZL_JFJXS") != null) && (!"".equals(returnData.get("SBZL_JFJXS").toString())))
/*  37:    */     {
/*  38: 41 */       jfjxs = returnData.get("SBZL_JFJXS").toString().split(",");
/*  39: 43 */       for (int i = 0; i < fjxss.size(); i++) {
/*  40: 45 */         for (int j = 0; j < jfjxs.length; j++)
/*  41:    */         {
/*  42: 47 */           if (i + 1 == Integer.parseInt(jfjxs[j].toString()))
/*  43:    */           {
/*  44: 49 */             sb.append("<input style='width:13px;height:13px;' type='checkbox' name='SBZL_JFJXS" + (i + 1) + "' value='" + (i + 1) + "' class='disabled init' disabled checked>" + ((Map)fjxss.get(i)).get("CODE_VALUE") + "</input>");
/*  45:    */             
/*  46: 51 */             break;
/*  47:    */           }
/*  48: 55 */           if (j == jfjxs.length - 1) {
/*  49: 57 */             sb.append("<input style='width:13px;height:13px;' type='checkbox' name='SBZL_JFJXS" + (i + 1) + "' value='" + (i + 1) + "' class='disabled init' disabled >" + ((Map)fjxss.get(i)).get("CODE_VALUE") + "</input>");
/*  50:    */           }
/*  51:    */         }
/*  52:    */       }
/*  53:    */     }
/*  54:    */     else
/*  55:    */     {
/*  56: 69 */       for (int i = 0; i < fjxss.size(); i++) {
/*  57: 71 */         sb.append("<input style='width:13px;height:13px;' type='checkbox' name='SBZL_JFJXS" + (i + 1) + "' value='" + (i + 1) + "' class='disabled init' disabled >" + ((Map)fjxss.get(i)).get("CODE_VALUE") + "</input>");
/*  58:    */       }
/*  59:    */     }
/*  60: 77 */     StringBuffer sb1 = new StringBuffer();
/*  61:    */     
/*  62: 79 */     String[] hfjxs = null;
/*  63: 81 */     if ((returnData.get("SBZL_HFJXS") != null) && (!"".equals(returnData.get("SBZL_HFJXS").toString())))
/*  64:    */     {
/*  65: 83 */       hfjxs = returnData.get("SBZL_HFJXS").toString().split(",");
/*  66: 85 */       for (int i = 0; i < fjxss.size(); i++) {
/*  67: 87 */         for (int j = 0; j < hfjxs.length; j++)
/*  68:    */         {
/*  69: 89 */           if (i + 1 == Integer.parseInt(hfjxs[j].toString()))
/*  70:    */           {
/*  71: 91 */             sb1.append("<input style='width:13px;height:13px;' type='checkbox' name='SBZL_HFJXS" + (i + 1) + "' value='" + (i + 1) + "' class='disabled init' disabled checked>" + ((Map)fjxss.get(i)).get("CODE_VALUE") + "</input>");
/*  72:    */             
/*  73: 93 */             break;
/*  74:    */           }
/*  75: 97 */           if (j == hfjxs.length - 1) {
/*  76: 99 */             sb1.append("<input style='width:13px;height:13px;' type='checkbox' name='SBZL_HFJXS" + (i + 1) + "' value='" + (i + 1) + "' class='disabled init' disabled >" + ((Map)fjxss.get(i)).get("CODE_VALUE") + "</input>");
/*  77:    */           }
/*  78:    */         }
/*  79:    */       }
/*  80:    */     }
/*  81:    */     else
/*  82:    */     {
/*  83:111 */       for (int i = 0; i < fjxss.size(); i++) {
/*  84:113 */         sb1.append("<input style='width:13px;height:13px;' type='checkbox' name='SBZL_HFJXS" + (i + 1) + "' value='" + (i + 1) + "' class='disabled init' disabled >" + ((Map)fjxss.get(i)).get("CODE_VALUE") + "</input>");
/*  85:    */       }
/*  86:    */     }
/*  87:119 */     rMap.put("jfjxs", sb.toString());
/*  88:    */     
/*  89:121 */     rMap.put("hfjxs", sb1.toString());
/*  90:    */   }
/*  91:    */ }


/* Location:           D:\Users\Desktop\shanxi\项目\sxazmis\WEB-INF\classes\
 * Qualified Name:     com.rinsi.app.jczl.kjxx.sbxx.SbxxService
 * JD-Core Version:    0.7.0.1
 */